<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="span12">

	<form id="initForm" action='<c:url value="/industry-manage/upload" />'
		class="form-horizontal" method="post" enctype="multipart/form-data">
		<fieldset>
			<legend>行业信息上传</legend>
			<div class="control-group">
				<label class="control-label" for="oldPassword">行业信息文件<br>(<a
					href='<c:url value="/sample/industrylist.xls" />'>下载sample文件</a>)
				</label>
				<div class="controls">
					<input type="file" id="uploadFile" name="uploadFile">
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<button type="submit" class="btn">上传</button>
				</div>
			</div>
		</fieldset>
	</form>
</div>

<script type="text/javascript">
	$(document).ready(function() {
		//defaults
		$.validator.setDefaults({
			submitHandler : function(form) {
				form.submit();
			}
		});

		//begin to validate
		$('#initForm').validate({
			rules : {
				uploadFile : {
					required : true
				}
			},
			messages : {
				uploadFile : {
					required : "请指定上传文件"
				}
			}
		});

		
</script>


